With the development of multimedia communications technologies, people desire three-dimensional (3D) videos in many application fields, such as entertainment and education. The foregoing applications all require that a plurality of camcorders is used for simultaneously obtaining video signals of a same scenario from different angles at different spatial locations, and effectively compressing, encoding, and transmitting a set of obtained video signals.
A depth image is introduced into a 3D video encoding and decoding technology, and different from a video image, the depth image is generally not used for displaying, but is used for generation of a virtual video. A depth image reconstructed after decoding needs to be filtered, so as to remove a blocking artifact.
In the prior art, a bilateral filter is used to filter a depth image. The bilateral filter is put forward based on a Gauss filtering method, where mainly for a principle, in Gauss filtering, that a weight value of Gauss is directly convoluted with an image pixel value to perform image filtering, a filtering weight coefficient is optimized to obtain a product of a Gauss function and image luminance information, and then the optimized weight coefficient is convoluted with the image pixel value, which may be used for keeping a sharp edge, but other parts of the image are smooth, causing the image to be vague.